<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTE-8" />
    <title>bolg</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel='stylesheet' href='/stylesheets/bootstrap.min.css' />
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body class="container">
	<header>
		<h1><%= title %></h1>
	</header>
	<h4>
		<nav>
			<span>
				<h3><a title="主页" href="/">主页</a></h3>
			</span>			
			<span>
				<h3><a title="列表" href="/archive">列表</a></h3>
			</span>
			<span>
				<h3><a title="标签" href="/tags">标签</a></h3>
			</span>
			<% if (user) { %>
			<span>
				<h3><a title="发表" href="/post">发表</a></h3>
			</span>
			<span>
				<h3><a title="上传" href="/upload">上传</a></h3>
			</span>
			<span>
				<h3><a title="登出" href="/logout">登出</a></h3>
			</span>
			<% } else { %>
			<span>
				<h3><a title="登陆" href="/login">登陆</a></h3>
			</span>
			<span>
				<h3><a title="注册" href="/reg">注册</a></h3>
			</span>
			<% } %>
		</nav>
		<form action="/search" method="GET" class="form-inline row">

			<div class="form-group col-xs-8">
			    <input type="text" class="form-control" name="keyword" placeholder="请输入文章标题">
			</div>
			<div class="col-xs-2">
				<button type="submit" class="btn btn-default">搜索</button>			
			</div>

		</form>
	</h4>
	<article>
<% if (success) { %>
  <h4><code><%= success %></code></h4>
<% } %>
<% if (error) { %>
  <h4><code><%= error %></code></h4>
<% } %>